package com.yumeng.webapp.controller;

import com.yumeng.common.api.ApiResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author wxd
 * @date 2024/11/19 13:59
 */
@Slf4j
@RestController
@RequestMapping("/demo")
public class DemoController {


    @GetMapping("/testMethod.do")
    public ApiResult testGetMethod(String param) {
        log.info("【GET】 testGetMethod:{}", param);
        return ApiResult.successData("【GET】" + param);
    }

    @PostMapping("/testMethod.do")
    public ApiResult testPostMethod(String param) {
        log.info("【POST】 testGetMethod:{}", param);
        return ApiResult.successData("【POST】" + param);
    }


}
